home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / doom / quake1.zip / XPAK041.ZIP / XPAK.DOC < prev    next >
Text File  |  1996-09-30  |  9KB  |  238 lines

  1. # XPak v0.4.1; 96/09/30. (c) Tom Wheeley; <splitbung>, tomw@tsys.demon.co.uk; 
  2.  
  3. Please note.  This manual is formatted as more of a reference guide than a
  4. manual, so things may not make much sense if read straight through.  If you
  5. are learning about xpak, then skip around the sections mentioned in 1.2.
  6.  
  7. * If you have an unanswered problem, then contact support@tsys.demon.co.uk *
  8.  
  9. Table of Contents
  10.  
  11.         1.  What is XPAK?
  12.           1.1  Introduction
  13.           1.2  Basic Syntax
  14.  
  15.         2.  What are the operating modes of XPAK?
  16.           2.1  List
  17.           2.2  Extract
  18.           2.3  Add
  19.           2.4  Remove
  20.           2.5  reName
  21.  
  22.         3.  Filename specification
  23.           3.1  Specifying a lumpname
  24.           3.2  Specifying filenames
  25.           3.3  Remapping lumpnames to differing filenames
  26.           3.4  Filename list files
  27.  
  28.         4.  Other Switches
  29.  
  30.         5.  Bugs / Future improvements
  31.  
  32.  
  33. 1.  What is XPAK?
  34.  
  35.   1.1  Introduction
  36.  
  37.     XPAK is the ultimate utility in Quake .PAK file management :)  It offers
  38.   superb flexibility in its use and range of options.  With XPAK you can
  39.   create, modify, list and extract entries from any PAK file.  XPAK offers
  40.   security features to help prevent you removing every lump from QUAKE.PAK!
  41.  
  42.  
  43.   1.2  Basic Syntax
  44.  
  45.     The easiest way to remember the syntax for XPAK is as follows:
  46.  
  47.   xpak mode_switch PAKfile other_switches FileList
  48.  
  49.   Where mode_switch is one of -l,-e,-a,-r,-n. See section 2
  50.         PAKfile is the PAK file to work on.  eg ID1.PAK
  51.         other_switches affect operation. See section 4 for details
  52.         FileList, List of files/lumps to work from/to.  See section 3
  53.  
  54.     The switches / mode_switch can be in any order, but this can become
  55.   confusing.  The PAKfile must be placed before the filelist, however.
  56.  
  57.  
  58. 2.  What are the operating modes of XPAK?
  59.  
  60.     Operating modes for XPAK are specified by adding the respective switch
  61.   to the command line.  If you specify more than one operating mode, then
  62.   XPAK will politely kick you back into DOS.
  63.  
  64.  
  65.   2.1  List  ( -l )
  66.  
  67.     In List mode, XPAK will list the name, size and offset of each lump in
  68.   the PAK directory which matches the filelist.  If no filelist is specified
  69.   then evey lump is displayed.  (Switches: -j)
  70.  
  71.   Example:  xpak -l id1.pak
  72.  
  73.  
  74.   2.2  Extract
  75.  
  76.     In Extract mode, XPAK will extract every lump which matches the filelist
  77.   to the filename mentioned in the PAK directory.  Any directories which
  78.   need creating are created automatically.  If a lumpname:filename pair is
  79.   specified in the file list, then that lump is extracted to the alternative
  80.   filename instead.  If there is no filelist, then every file is extracted.
  81.   (Switches: -i -f -b -p -v)
  82.  
  83.   Example:  xpak -e id1.pak spr*
  84.  
  85.  
  86.   2.3  Add
  87.  
  88.     Add mode in XPAK comprises both create and update operations.  If the
  89.   PAKfile does not exist, then Add will create it and add all the files
  90.   in the filelist (performing lumpname conversions where appropriate).
  91.   If the PAKfile does exist, then the filelist files are simply added.
  92.   If one of the lumps in the filelist exists in the PAKFile, then that
  93.   entry is updated with the new data from the file. (Switches: -i -p -v)
  94.  
  95.   Example:  xpak -a id1.pak -o maps/test4.bsp  (Adds new map to PAK file)
  96.             xpak -a id1.pak -o maps/test3.bsp  (Replaces map with new file)
  97.             xpak -a maps.pak maps/*.*          (Creates PAK file with maps)
  98.  
  99.  
  100.   2.4  Remove
  101.  
  102.     Remove mode allows you to remove lumps mentioned in the filelist from
  103.   the PAKfile. (Switches: -v)
  104.  
  105.   Example:  xpak -r id1.pak -o maps/test4.bsp  (Remove the map from the PAK)
  106.  
  107.  
  108.   2.5  reName
  109.  
  110.     Rename mode simply renames every lump in the filelist to the
  111.   corresponding filename for that lump (You must use lumpname:filename
  112.   notation).  The filename is automatically converted to lowercase and
  113.   forward slashes. (Switches: -v)
  114.  
  115.   Example:  xpak -n maps.pak maps/test3.bsp:maps/water.map
  116.  
  117.  
  118. 3.  Filename specification
  119.  
  120.     Filename specification is done by putting a succession of patterns on
  121.   the command line, and any filename/lumpname which matches will be acted
  122.   upon.  Note that DOS filenames are automatically converted to backslashes
  123.   and lumpnames are automatically lowercased and converted to foreslashes.
  124.  
  125.  
  126.   3.1  Specifying a lumpname
  127.  
  128.     Lumpnames can be matched by text and the wildcards * and ?  Where ?
  129.   matches any single letter, and * matches any sequence of letters.  Unlike
  130.   DOS wildcards, '/' and '.' have no special meaning.  Thus spr* will match
  131.   sprites/foo.bar.  Lumpnames are used by -l -e -r
  132.  
  133.  
  134.   3.2  Specifying filenames
  135.  
  136.     In Add mode ( -a ) the filespecs no longer refer to lumpnames, but to
  137.   filenames.  In order that the files which match such filespecs are all
  138.   gathered these filespecs must use DOS style wildcards, with each directory
  139.   needing to be individually mentioned.  Remember that a wildcard / text
  140.   must be specified on either side of the .
  141.  
  142.  
  143.   3.3  Remapping lumpnames to differing filenames
  144.  
  145.     Sometimes it is desirable to add data from file 'y' to lumpname 'x'.
  146.   This can be done by specifying a remapping oon the command line, of the
  147.   form lumpname:filename (ie x:y)  This remapping is used by all modes bar -l
  148.   Note that remappings cannot conatin any wildcards.  The use of remapping is
  149.   cheated slightly by Rename ( -n ) as the filename there applies to the
  150.   new lumpname.
  151.  
  152.     When XPAK is compiling a list of all filenames, it takes remapped entries
  153.   in preference over normnal entries, so for example:
  154.  
  155.   xpak -e id1.pak * quake.rc:tomw.rc -v
  156.  
  157.   Here quake.rc is implicitly mentioned twice on the command line, and xpak
  158.   honours the remapped one over the straight extraction.  (This will also
  159.   work thus: `xpak -e id1.pak quake.rc:tomw.rc * -v`)
  160.  
  161.  
  162.   3.4  Filename list files
  163.  
  164.     Sometimes the number of files involved in a PAKfile, can result in long
  165.   tedious command lines, so XPAK can read in file lists from a separate file.
  166.   Note that this is not the same as a response file, as switches in a filelist
  167.   will be counted as files (You can access lumps/files that begin with a -
  168.   with this 'feature' by putting them in a filelist file).
  169.  
  170.     This file is accessed on the command line as @filename, where filename is
  171.   the name of the file containing the file list.  Lines in the file list
  172.   starting with '#' are treated as comments.
  173.  
  174.     An example file, which contains the name of every lump in the ID1.PAK is
  175.   distributed with XPAK as ID1_PAK.TXT.  Note that you can reorder the files
  176.   in a PAK file by listing (with -j) to a filelist file, reordering the
  177.   filelist, then creating a new PAK with `xpak -a id2.pak @filelist -v`
  178.  
  179.  
  180. 4.  Other Switches
  181.  
  182.  -b #  Create Backups.
  183.        In extract, if the extract file exists then a backup is made of the
  184.        existing file.  In PAKfile modification modes, a backup is made of
  185.        the PAKfile. (Unimplemented)
  186.  
  187.  -f    Force overwrites.
  188.        Normally in extract, if the destination file exists then it is skipped.
  189.        This switch forces XPAK to overwrite that file.
  190.  
  191.  -i    Interactive mode.
  192.        In extract mode, XPAK will ask if you want to overwrite existing files
  193.        and Add mode will ask if you want to update a PAK file if the lumpname
  194.        exists.  y=Yes, n=No, a=All (Yes to All), s=Skip (No to All), q=Quit
  195.  
  196.  -j    Just names.
  197.        In List mode, causes XPAK not to display the Offset and Size data,
  198.        but just the lumpnames.  This is useful when redirecting the output of
  199.        XPAK to make filelists (a la ID1_PAK.TXT)
  200.  
  201.  -o    Override Safeties
  202.        XPAK has the following safety condition.
  203.        1.  It will not modify a pakfile called PAK0.PAK.  (work on a copy!)
  204.        Using the -o switch overrides the safety.
  205.  
  206.  -q #  Query mode.
  207.        Mainly for if you can't be bothered to make a filelist, XPAK will ask
  208.        you if you want to process each lump/file
  209.  
  210.  -v    verbose mode.  Display names of lumps during processing.
  211.        Displays information on what XPAK is doing.  Without -v virtually no
  212.        screen output is madeother than errors (expect List).
  213.  
  214.  -x #  exclude filenames
  215.        Toggles the exclude flag to exclude the following filenames from the
  216.        filelist.  Can also be effected for single entries by prepending
  217.        with ! (neccesary for mixed filelists).  Note that a filelist placed
  218.        after a -x will be marked as excludes, except for entries with a !.
  219.        This might work, I'm not sure.
  220.  
  221. 5.  Bugs / Future improvements
  222.  
  223.  .  For Add and Remove, XPAK will fail and probably corrupt the PAK file
  224.     if the PAK directory is not at the end of the file!  In normal use with
  225.     the ID1.PAK and XPAK this situation will not happen.
  226.  
  227.  .  Don't run out of diskspace.  If this happens during -a or (unlikely)
  228.     -r, then the PAK file will become unusable.  XPAK is very lenient on the
  229.     disk space it requires, never using temp files, but be careful if you
  230.     are working on nearly full shared drive.
  231.  
  232.  .  I'm sure that wildcard management could be improved (wildcarded remaps)
  233.  
  234.  .  I don't (yet) have a working protected mode TP compiler, so everything
  235.     is done in 64k chunks. (It's not slow, though...)
  236.  
  237. -----------------------------------------------------------------------------
  238.